package service

import (
	"sbd_nydjz/models"
	"sbd_nydjz/reposit"
)

type GasterService struct {
	Repo reposit.GasterReposit
}

func (service GasterService) InsterGasterHandler(isGaster models.Djzinfo) (is bool, err error) {
	code := isGaster.Djzh
	is, err = service.Repo.IsGasterOne(code)
	if err != nil {
		return
	}
	is, err = service.Repo.InsertGasterOne(isGaster)
	if err != nil {
		return
	}
	return
}
